<?php

class ComplaintService extends BaseService {
	
	public function addComplaint($sales_detail_id, $employee, $product_count, $product_price, $reason) {
		$complaintManager = new ComplaintManager();
		
		$complaint = new Complaint_Domain();
		
		$complaint->setProcessedBy($employee);
		$complaint->setProductCount($product_count);
		$complaint->setProductPrice($product_price);
		$complaint->setReason($reason);
		
		$salesDetail = new SalesDetail_Domain();
		
		$salesDetail->setSalesDetailId($sales_detail_id);
		
		$complaint->setSalesDetail($salesDetail);
		
		$complaintManager->setObj($complaint);
		
		$complaintManager->add();
	}
}